/*
* 默认的状态页配置
* */
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:rebase_project/res/dimens.dart';
import 'package:rebase_project/res/style.dart';
import 'package:rebase_project/src/base/widget/Button.dart';
import 'package:caose/caose.dart' show PageStateWidget,Loading;

mixin DefalutPageStateWidgetMixin on PageStateWidget {
  Widget loading() {
    return Loading();
  }

  //错误状态
  Widget error() {
    return Container();
  }

  //重试状态
  Widget retry() {
    return Container(
      child: Column(
        children: <Widget>[
          Text("重试"),
          Builder(builder: (context){
            return Button(
              onPressed:()=> onRetry(context),
              child: Text("点击重试"),
            );
          })
        ],
      ),
    );
  }
}
